package com.bl.student.dao.repository;

import com.bl.student.dao.model.UserCollectEntity;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by yujingyi on 2018/3/21.
 */
public interface UserCollectRepository extends PagingAndSortingRepository<UserCollectEntity, String> {
    List<UserCollectEntity> findByUserId(String userId);

    List<UserCollectEntity> findByDetailId(String detailId);

    List<UserCollectEntity> findByDetailIdAndUserId(String detailId, String userId);

    void deleteByUserId(String userId);

    void deleteByDetailId(String detailId);

    void deleteByDetailIdAndUserId(String detailId, String userId);
}
